Conventionally, there is a technique of performing communication between apparatuses, using near field communication such as NFC (Near Field Communication). In near field communication, in accordance with the fact that a communication target, which is another communication apparatus, has come close to a communication apparatus, the communication target is specified, and communication is started between the communication apparatus and the communication target.
In conventional near field communication, every time any communication target (for example, an NFC tag) comes close to an information processing apparatus (for example, an NFC reader/writer) that communicates, communication is established between the communication target and the information processing apparatus, and data is transmitted and received. Conventionally, there is a case where unnecessary communication is performed for the same communication target, which prevents efficient near field communication.
Therefore, the present application discloses a storage medium having stored therein a communication program capable of efficiently performing near field communication, an information processing apparatus, a communication system, and a communication method that are capable of efficiently performing near field communication, and a storage medium having a communication function capable of efficiently performing near field communication.
(1)
An example of a storage medium according to the present specification is a non-transitory computer-readable storage medium having stored therein a communication program to be executed by a computer of an information processing apparatus capable of performing near field communication with a communication target.
The communication target has stored therein main data to be read, identification information unique to each communication target, and status information set in accordance with writing of the main data to the communication target.
The communication program causes the computer to execute reading and determination.
In accordance with the fact that, as a result of the communication target coming close to the information processing apparatus, the information processing apparatus has become capable of performing near field communication with the communication target, the computer reads the identification information and the status information of the communication target from the communication target.
The computer determines, on the basis of the read identification information and status information, whether or not it is necessary to read the main data from the communication target.
(2)
It may be determined, on the basis of the read identification information and status information, whether or not the main data from the communication target having become capable of communicating with the information processing apparatus has already been acquired, thereby determining whether or not it is necessary to read the main data from the communication target.
(3)
The communication program may further cause the computer to execute: if it has been determined that the main data has already been acquired, not reading the main data from the communication target; and if it has been determined that the main data has not yet been acquired, reading the main data from the communication target.
(4)
The communication program may further cause the computer to execute, if the main data has been read from the communication target, saving the read main data in a storage section of the information processing apparatus. If it has been determined that the main data has already been acquired, the main data saved in the storage section is used as the main data read from the communication target.
(5)
When the main data is written to the communication target, the main data may be saved in the storage section.
(6)
The communication program may further cause the computer to execute saving the read status information in a storage section of the information processing apparatus in association with the identification information with respect to each communication target. Regarding the communication target corresponding to the identification information read from the communication target, if the read status information matches the status information saved in the storage section, it is determined that it is not necessary to read the main data, and if the read status information does not match the status information saved in the storage section, it is determined that it is necessary to read the main data.
(7)
The communication program may further cause the computer to execute, when the main data is written to the communication target, updating a content of the status information stored in the communication target.
(8)
When an instruction to communicate with the communication target has been given by an application executed by the information processing apparatus, the identification information and the status information may be read from the communication target. Further, when an instruction to communicate with the communication target has been given by an application executed by the information processing apparatus, if it has been determined that the main data has already been acquired, the main data may not be read from the communication target.
(9)
When an instruction to read the main data from the communication target has been given by the application, the identification information and the status information may be read from the communication target. Further, when an instruction to read the main data from the communication target has been given by the application, if it has been determined that main data has already been acquired, the main data may not be read from the communication target.
(10)
When an instruction to rewrite the main data to the communication target has been given by the application, the identification information and the status information may be read from the communication target. Further, when an instruction to rewrite the main data to the communication target has been given by the application, if it has been determined that the main data has not yet been acquired, the main data to be rewritten may be read from the communication target, and if it has been determined that the main data has already been acquired, the main data may not be read from the communication target.
(11)
The status information may be information uniquely set in accordance with the number of times data has been written to the communication target.
(12)
The status information may be at least one of counter information indicating the number of times data has been written to the communication target and time information indicating a time when data has been written to the communication target.
(13)
A total data size of the identification information and the status information may be smaller than a data size of the main data.
It should be noted that the present specification discloses an example of an information processing apparatus including functions equivalent to those of the information processing apparatus according to the above configurations (1) through (13), and discloses an example of a communication system including the communication target (a communication target apparatus) and the information processing apparatus according to the above configurations (1) through (13). Further, the present specification discloses a communication method to be performed by the information processing apparatus according to the above configurations (1) through (13).
In addition, the present specification discloses an example of a storage medium including functions equivalent to those of the communication target according to the above configurations (1) through (13). Here, the storage medium may be in the form of being used mainly as storage means, such as an IC card, or may be in the form of being built into an information processing apparatus (for example, an information processing apparatus having an NFC card emulation function).
These and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.